﻿#define _CRT_SECURE_NO_WARNINGS 1
//////
//////
//////#include<iostream>
//////#include<vector>
//////using namespace std;
//////
//////
//////
//////class Date
//////{
//////public:
//////	Date(int year = 1900, int month = 1, int day = 1)
//////		: _year(year)
//////		, _month(month)
//////		, _day(day)
//////	{}
//////
//////	bool operator<(const Date& d) const
//////	{
//////		return (_year < d._year) ||
//////			(_year == d._year && _month < d._month) ||
//////			(_year == d._year && _month == d._month && _day < d._day);
//////	}
//////
//////	bool operator>(const Date& d) const
//////	{
//////		return (_year > d._year) ||
//////			(_year == d._year && _month > d._month) ||
//////			(_year == d._year && _month == d._month && _day > d._day);
//////	}
//////
//////	friend ostream& operator<<(ostream& _cout, const Date& d);
//////private:
//////	int _year;
//////	int _month;
//////	int _day;
//////};
//////
//////ostream& operator<<(ostream& _cout, const Date& d)
//////{
//////	_cout << d._year << "-" << d._month << "-" << d._day;
//////	return _cout;
//////}
//////
//////template<class T>
//////bool Less(const T& left, const T& right)
//////{
//////	return left < right;
//////}
//////
//////// 特化一下
//////template<>
//////bool Less<Date*>( Date* const& left, Date* const& right)
//////{
//////	return *left < *right;
//////}
//////
//////int main()
//////{
//////	Date* d1 = new Date(2023, 10, 8);
//////	Date* d2 = new Date(2023, 10, 9);
//////	cout << Less(d1, d2) << endl;
//////	return 0;
//////}
////
////
////
////
////
////#include<iostream>
////using namespace std;
////
////#include<iostream>
////using namespace std;
////
////int Part_Sort2(int* a, int left, int right)
////{
////    int key = a[left]; // 基准值
////    int tmp = left; // 坑的位置
////    while (left < right)
////    {
////        // 右边找小于基准值的元素
////        while (left < right && a[right] >= key)
////        {
////            right--;
////        }
////        a[tmp] = a[right]; // 将找到的元素放入坑中
////        tmp = right;
////
////        // 左边找大于基准值的元素
////        while (left < right && a[left] <= key)
////        {
////            left++;
////        }
////        a[tmp] = a[left]; // 将找到的元素放入坑中
////        tmp = left;
////    }
////
////    a[tmp] = key; // 将基准值放入坑中
////    return tmp; // 返回基准值的索引
////}
////
////
////void Quick_Sort(int* a, int left, int right)
////{
////    if (left >= right)
////        return;
////
////    int div = Part_Sort2(a, left, right);
////    Quick_Sort(a, left, div - 1);
////    Quick_Sort(a, div + 1, right);
////}
////
////
////int main()
////{
////    int n = 0;
////    cin >> n;
////    int* arr = new int[100000];
////    for (int i = 0; i < n; i++)
////    {
////        cin >> arr[i];
////    }
////
////    Quick_Sort(arr, 0., n - 1);
////
////    for (int i = 0; i < n; i++)
////    {
////        printf("%d ", arr[i]);
////    }
////    return 0;
////}
//
//
//
////#include <iostream>
////
////using namespace std;
////
////const int N = 1000010;
////
////int q[N];
////
////int quick_sort(int q[], int l, int r, int k)
////{
////    if (l >= r) return q[l];
////
////    int i = l - 1, j = r + 1, x = q[(l + r) >> 1];
////    while (i < j)
////    {
////        do i++; while (q[i] < x);
////        do j--; while (q[j] > x);
////        if (i < j) swap(q[i], q[j]);
////    }
////
////    if (j - l + 1 >= k) return quick_sort(q, l, j, k);
////    else return quick_sort(q, j + 1, r, k - (j - l + 1));
////}
////
////int main()
////{
////    int n, k;
////    scanf("%d%d", &n, &k);
////
////    for (int i = 0; i < n; i++) scanf("%d", &q[i]);
////
////    cout << quick_sort(q, 0, n - 1, k) << endl;
////
////    return 0;
////}
//


//WY22 Fibonacci数列
#include <iostream>
#include <vector>
#include <string>
using namespace std;
//
////int main()
////{
////    int f = 0;
////    int f1 = 0;
////    int f2 = 1;
////    int  n;
////    int left = 0;
////    int right = 0;
////    cin >> n;
////    while (1)
////    {
////        f = f1 + f2;
////        f1 = f2;
////        f2 = f;
////        if (f < n)
////        {
////            left = f;
////        }
////        else
////        {
////            right = f;
////            break;
////        }
////    }
////    int minnum = min(n - left, right - n);
////    cout << minnum << endl;
////    return 0;
////}
//
////
////int main()
////{
////    int n;
////    cin >> n;
////    vector<string> v;
////    v.resize(n);
////    for (auto& str : v)
////        cin >> str;
////    bool lenSym = true, lexSym = true;
////    // 这里要注意从i=1开始遍历，前后比较，比较长度
////    for (size_t i = 1; i < v.size(); ++i)
////    {
////        if (v[i - 1].size() >= v[i].size())
////        {
////            lenSym = false;
////            break;
////        }
////    }
////    //比较ASCII码
////    for (size_t i = 1; i < v.size(); ++i)
////    {
////        if (v[i - 1] >= v[i])
////        {
////            lexSym = false;
////            break;
////        }
////    }
////    if (lenSym && lexSym)
////        cout << "both" << endl;
////    else if (!lenSym && lexSym)
////        cout << "lexicographically" << endl;
////    else if (lenSym && !lexSym)
////        cout << "lengths" << endl;
////    else if (!lenSym && !lexSym)
////        cout << "none" << endl;
////    return 0;
////}
//

//﻿class A
//{
//public:
//  void f() { cout << "A::f()" << endl; }
//  int a;
//};
//
//class B : public A
//
//{
//
//public:
//
//	void f(int a) { cout << "B::f()" << endl; }
//
//	int a;
//
//};
//
//
//
//int main()
//
//{
//
//	B b;
//
//	b.f(1);
//
//	return 0;
//
//}


class A
{
public:
    void fun()
    {
        cout << "func()" << endl;
    }
};

class B : public A
{
public:
    void fun(int i)
    {
        cout << "func(int i)->" << i << endl;
    }
};

int main()
{
    B b;
    b.fun(10);
   、、 b.fun(); //错误
    b.A::fun();
    return 0;
};



//请计算n* m的棋盘格子（n为横向的格子数，m为竖向的格子数）从棋盘左上角出发沿着边缘线从左上角走到右下角，总共有多少种走法，要求不能走回头路，即：只能往右和往下走，不能往左和往上走。
#include<iostream>
#include<vector>
using namespace std;
int main()
{
    int dfs(int n, int m);
    int n, m;
    while (cin >> n >> m)//n是列，m是行
    {
        vector<vector<int>>dp(m + 1, vector<int>(n + 1, 1));
        for (int i = 1; i <= m; i++)
        {
            for (int j = 1; j <= n; j++)
            {
                dp[i][j] = dp[i - 1][j] + dp[i][j - 1];
            }
        }
        cout << dp[m][n] << endl;
        //cout<<dfs(n,m)<<endl;
    }
}